﻿Public Class clsCliente
    Inherits clsConexao
    Private fCondicao As String = ""
    Private fInativo1 As Byte, fBloqueado1 As Byte, fEnvia_Sms As Byte, fInativo As Byte, fBloqueado As Byte, fSync_Foto As Byte
    Private fNome As String = "", fU_Cadastro As String = "", fU_Alteracao As String = ""
    Private fCodigo As Integer, fTecnico As Integer, fFraquiadora As Integer, fRelacionamento As Integer
    Private fValidade As Date, fD_Cadastro As Date, fD_Alteracao As Date
    Public Property Codigo() As Integer
        Get
            Return fCodigo
        End Get
        Set(ByVal value As Integer)
            fCodigo = value
        End Set
    End Property
    Public Property Nome() As String
        Get
            Return fNome
        End Get
        Set(ByVal value As String)
            fNome = value
        End Set
    End Property
    Public Property Inativo1() As Byte
        Get
            Return fInativo1
        End Get
        Set(ByVal value As Byte)
            fInativo1 = value
        End Set
    End Property
    Public Property Bloqueado1() As Byte
        Get
            Return fBloqueado1
        End Get
        Set(ByVal value As Byte)
            fBloqueado1 = value
        End Set
    End Property
    Public Property Tecnico() As Integer
        Get
            Return fTecnico
        End Get
        Set(ByVal value As Integer)
            fTecnico = value
        End Set
    End Property
    Public Property Validade() As Date
        Get
            Return fValidade
        End Get
        Set(ByVal value As Date)
            fValidade = value
        End Set
    End Property
    Public Property D_Cadastro() As Date
        Get
            Return fD_Cadastro
        End Get
        Set(ByVal value As Date)
            fD_Cadastro = value
        End Set
    End Property
    Public Property U_Cadastro() As String
        Get
            Return fU_Cadastro
        End Get
        Set(ByVal value As String)
            fU_Cadastro = value
        End Set
    End Property
    Public Property D_Alteracao() As Date
        Get
            Return fD_Alteracao
        End Get
        Set(ByVal value As Date)
            fD_Alteracao = value
        End Set
    End Property
    Public Property U_Alteracao() As String
        Get
            Return fU_Alteracao
        End Get
        Set(ByVal value As String)
            fU_Alteracao = value
        End Set
    End Property
    Public Property Envia_Sms() As Byte
        Get
            Return fEnvia_Sms
        End Get
        Set(ByVal value As Byte)
            fEnvia_Sms = value
        End Set
    End Property
    Public Property Inativo() As Byte
        Get
            Return fInativo
        End Get
        Set(ByVal value As Byte)
            fInativo = value
        End Set
    End Property
    Public Property Bloqueado() As Byte
        Get
            Return fBloqueado
        End Get
        Set(ByVal value As Byte)
            fBloqueado = value
        End Set
    End Property
    Public Property Fraquiadora() As Integer
        Get
            Return fFraquiadora
        End Get
        Set(ByVal value As Integer)
            fFraquiadora = value
        End Set
    End Property
    Public Property Relacionamento() As Integer
        Get
            Return fRelacionamento
        End Get
        Set(ByVal value As Integer)
            fRelacionamento = value
        End Set
    End Property
    Public Property Sync_Foto() As Byte
        Get
            Return fSync_Foto
        End Get
        Set(ByVal value As Byte)
            fSync_Foto = value
        End Set
    End Property
    Private Sub clsFilial_ListaCampo(ByVal ParAcao As enuTConexao, ByRef parErro As Boolean) Handles Me.ListaCampo
        fNomeTabela = "CLIENTES"
        AlimentaCampo("CLI_CODIGO", fCodigo, True)
        AlimentaCampo("CLI_NOME", fNome, False)
        AlimentaCampo("CLI_INATIVO1", fInativo1, False)
        AlimentaCampo("CLI_BLOQUEADO1", fBloqueado1, False)
        AlimentaCampo("CLI_TECNICO", fTecnico, False)
        AlimentaCampo("CLI_VALIDADE", fValidade, False)
        AlimentaCampo("CLI_D_CADASTRO", fD_Cadastro, False)
        AlimentaCampo("CLI_U_CADASTRO", fU_Cadastro, False)
        AlimentaCampo("CLI_D_ALTERACAO", fD_Alteracao, False)
        AlimentaCampo("CLI_U_ALTERACAO", fU_Alteracao, False)
        AlimentaCampo("CLI_ENVIA_SMS", fEnvia_Sms, False)
        AlimentaCampo("CLI_INATIVO", fInativo, False)
        AlimentaCampo("CLI_BLOQUEADO", fBloqueado, False)
        AlimentaCampo("CLI_FRAQUIADORA", fFraquiadora, False)
        AlimentaCampo("CLI_RELACIONAMENTO", fRelacionamento, False)
        AlimentaCampo("CLI_SYNC_FOTO", fSync_Foto, False)
        If fCondicao <> "" Then CondicaoSql = fCondicao
    End Sub

End Class
